from operation import testOperation
from ddt import ddt
from ddt import data
from ddt import unpack
from unittest import TestCase

num = [
    [1, 3, 4],
    [3, 5, 8]
]
num1 = [
    [6, 3, 3],
    [10, 4, 6],
    [7, 5, 2]
]
num2 = [
    [2, 3, 6],
    [5, 6, 30]
]
num3 = [
    [15, 3, 5],
    [25, 5, 5]
]


@ddt
class TestAdd(TestCase):
    @data(*num)
    @unpack
    def test_add(self, a, b, c):
        add = testOperation()
        A = add.Add(a, b)
        self.assertEqual(A, c)


@ddt
class TestSubtract(TestCase):
    @data(*num1)
    @unpack
    def test_Subtract(self, a, b, c):
        subtract = testOperation()
        B = subtract.subtract(a, b)
        self.assertEqual(B, c)


@ddt
class TestMultiply(TestCase):
    @data(*num2)
    @unpack
    def test_Multiply(self, a, b, c):
        multiply = testOperation()
        C = multiply.multiply(a, b)
        self.assertEqual(C, c)


@ddt
class TestDivide(TestCase):
    @data(*num3)
    @unpack
    def test_Divide(self, a, b, c):
        divide = testOperation()
        D = divide.divide(a, b)
        self.assertEqual(D, c)
